Response. setContentType (MIME) is used to enable the client browser to differentiate different types of data and call different program embedding modules in the browser to process the corresponding data according to different MIME types.
For
Functions and parameters of response. setContentType () in JSP,
Functions and parameters of response. setContentType () in JSP
Response. setContentType (MIME) is used to enable the client browser to differentiate different types of data and call
Request. setcharacterencoding () is used to set the value obtained from the request or retrieved from the database.
Response. setcontenttype ("text/html; charset = gb2312") is set to Chinese encoding on the page
The former sets dynamic text
Response. setContentType (MIME_TYPE) is used to differentiate different types of data in the client browser. Based on the MIME_TYPE, different program embedding modules in the browser are called to process the corresponding data.
For example, the
I didn't know the parameters of response's setcontenttype when I wrote the web program for such a long time. When the difference was reached, there were so many parameters. Okay, I don't
The article is not original. For more information, see the end of this article!
The following table lists common MIME types:
Serial number
Content type
File Extension
Description
1
Application/MSWord
Doc
Summary of several ways to obtain json data from the server based on the $. ajax () method,. ajaxjson
1. What is json
Json is a data structure that replaces xml. Compared with xml, json is more compact but has a strong descriptive capability, and
Web applications must meet the needs of multiple languages. Users in different countries should be able to enter characters in their own languages, and Web applications should be able to display pages in multiple languages according to different
Summary: Spring Data JPA is actually a dynamic proxy for JDK mode (requires an interface with a whole bunch of top-repository interfaces from Org.springframework.data.repository,There are crudrepository interface and an implementation class
Request.setcharacterencoding () is the setting of the value taken from the request or the value taken from the databaseResponse.setcontenttype ("text/html;charset=gb2312") is the Chinese encoding in the settings pageThe former is to set the dynamic
There was a software project recently. The customer found that IE6 opened the Excel file on the page and saw garbled characters.
After investigation, we found that IE6 has some strange ways of working, which can be regarded as a bug.
When a
The following code downloads all types of resources!
Public actionforward downloaddata (actionmapping mapping, actionform form,Httpservletrequest request, httpservletresponse response)Throws exception {Actionforward forward = NULL;String newsid =
Article Source: http://www.blogjava.net/freeman1984/archive/2010/06/01/322465.html
Source:Http://blog.csdn.net/yzhz
I. Problems:The coding problem is that Java beginners often encounter problems during web development. There are also a large
There are several headers related to cache in http:1. Pragma: Only the fixed no-Cache value can be used in HTTP/1.0 to disable browser cache.2. Expires: Used to specify when the cached document is deemed to have expired, in GMT format. if the date
I recently saw an open source that uses Java to manipulate excel on the Internet. I tried it on WebLogic and thought it was good. I would like to recommend it to you.
First go to the terminal.
Write a JavaBean file and use jexcelapi to
I. Servlet output garbled characters1. Use the servlet. getOutStream byte stream to output Chinese characters. Suppose the output is String str = "the Diaoyu Islands are from China, and the shameless is from Japan ".1.1 If the local server and the
Ireport:
First, we use ireport to design the report style and generate the. jasper file through compilation to prepare for java.
Second, we define the report public class in java to parse the. jasper file.
Finally, the stream is output to the page.
1
The biggest headache for JSP development using Tomcat is the Chinese Garbled text. To sum up the reasons for Tomcat Garbled text, you must understand the following:
1. Tomcat generally uses the ISO-8859-1 as the character encoding method by
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.